import styles from './index.module.scss'
import cm from 'classnames'
import Button from '../button'
import Link from 'next/link'

const Desc = props => {
  const { name, focusName, id, eporder } = props.data || {}

  return (
    <div className={styles.desc}>
      <Link href={`/vod/detail/${id}`} className={cm(styles.firstSeries, 'textEllipsis')}>
        {name}
      </Link>
      <p className={cm(styles.secondSeries, 'textEllipsis')}>{focusName}</p>
      <div className={styles.btnGroup}>
        <Button
          className={styles.btn}
          link
          href={`/vod/play-official/${id}/${eporder}`}
          onClick={e => e.stopPropagation()}
        >
          <img loading="lazy" src="/images/h-play.png" alt="播放跳转" />
          <span>播放</span>
        </Button>
        <Button
          className={cm(styles.btn, styles.btnDetail)}
          link
          href={`/vod/detail/${id}`}
          onClick={e => e.stopPropagation()}
        >
          <img loading="lazy" src="/images/h-detail.png" alt="详情页跳转" />
          <span>详情</span>
        </Button>
      </div>
    </div>
  )
}

export default Desc
